package com.craney.testTextField
{
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFormat;
	
	public class MyTextFieldFormat
	{
		private var parentSprite:Sprite;
		
		private var tf:TextField = new TextField();
		
		
		public function MyTextFieldFormat(ps:Sprite)
		{
			parentSprite = ps;
			tf.border = true;
			tf.background = true;
			tf.multiline = true;
			tf.wordWrap = true;
			tf.text = "There are only 10 types of people in the world: Those who understand binary, and those who don't.";
			
			var defaultColor:TextFormat = new TextFormat();
			defaultColor.color = 0x00FF00;
			tf.defaultTextFormat = defaultColor;
			
			var formate1:TextFormat = new TextFormat();
			formate1.color = 0xFF0000;
			tf.setTextFormat(formate1);
			
			tf.text = "It have changed!";
			
			var formate2:TextFormat = new TextFormat();
			formate2.font = "Courier";
			tf.setTextFormat(formate2);
			
			
			
			parentSprite.addChild(tf);
		}

	}
}